# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=gnats
pkgver=4.2.0
pkgrel=5
pkgdesc="The GNU Bug Tracking System"
url="https://www.gnu.org/software/gnats/"
arch="all"
license="GPL-3.0"
depends="postfix"
makedepends="texinfo"
install=
source="https://ftp.gnu.org/pub/gnu/$pkgname/$pkgname-$pkgver.tar.gz
	no-werror.patch
	"
subpackages="$pkgname-doc"
pkgusers="gnats"
pkggroups="gnats"

build() {
	cd "$srcdir/$pkgname-$pkgver"

	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--sharedstatedir=/var/lib \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info \
		|| return 1

	make -j1 || return 1
}
package() {
	cd "$srcdir/$pkgname-$pkgver"
	make DESTDIR="$pkgdir/" install
	rm -f "$pkgdir"/gnats.el
}

sha512sums="650faa87206889912e27a27daba4c86292fac90250a88e7e6272cc8488fc19dfd6098bdd450553cd6c2c1d446072a8da9395f1ce7b1cd284596994ce53744152  gnats-4.2.0.tar.gz
f37cbc05bcf4fe37226e95ca84162ffa9ca92da3e30907dbbde67805aa0ab6210724a954a9106f4522c0adcaf936919beb11afb7d477142491be09c9da0ee38d  no-werror.patch"
